import { axios } from "@/services/axios";

const OrgUnit = {
  query: params => axios.get(`api/orgunit`, params),
  queryActive: () => axios.get(`api/orgunitactive`),
  create: data => axios.post(`api/orgunit`, data),
  get: id => axios.get(`api/orgunit/${id}`),
  save: data => axios.post(`api/orgunit/${data.id}`, data),
  delete: data => axios.post(`api/orgunit/delete/${data.id}`),
  active: data => axios.get(`api/orgunit/active/${data.id}`),
  select: (orgstruct_id, data) => axios.post(`api/orgunit/select/${orgstruct_id}`,data),
  querylist: params => axios.post(`api/orgunitlist`, params),
};
export default OrgUnit;
